fix: PHP warnings triggered by the test suite#302
Conversation
bd28e37 to
2270fae
Compare
2270fae to
82caad1
Compare
433b083 to
8d6330e
Compare
|
@thePanz hey, I got it tests passes on GitHub action. Let me know whether this PR has any chance to be merged. |
8d6330e to
e1e02b2
Compare
|
|
||
| class_exists('Swift'); | ||
|
|
||
| if (version_compare(Swift::VERSION, '6.0.0') >= 0) { |
There was a problem hiding this comment.
This approach is a bit like https://github.com/FriendsOfSymfony1/symfony1/pull/237/files but way more elegant.
Question is, if we are able to support swiftmailer 6 including the doctrine spools, do we really need to support swiftmailer 5?
There was a problem hiding this comment.
Good question, I guess not.
But it depends, on the ability of applications using swiftmailer 5 to migrate to swiftmailer 6.
There was a problem hiding this comment.
This opens a path to add support for symfony/mailer.
There was a problem hiding this comment.
I do like this approach to support the files being loaded by composer.
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| if (!defined('SF_TEST_WITHOUT_COMPOSER')) { |
e1e02b2 to
b8b25b3
Compare
The test should fail when a warning PHP error occurred.
Depends on
How to execute tests?
To make test passes, I apply the following dependencies:
Checkout the "bundle": https://github.com/alquerci/symfony1/tree/fixtest-fail-on-php-errors--dev
Then execute:
What is done?
error_reportingto catch from PHP warnings and higher errors.sfMailertransport forSwitfv6 isSwift_SmtpTransportinstead ofSwift_MailTransport.Swift_MailTransportas been removed.data/bin/symfony symfony:test --trace --update-autoloaderWhat about the CI?
I try to put a PHP error_reporting directive, but the execution environment looks like different than docker.
Next steps